﻿using System.Globalization;

namespace WebFront.Middleware
{
    /// <summary>
    /// 弹幕中间件 
    /// <para></para>
    /// </summary>
    public class DanmuMiddleware
        (RequestDelegate next)
    {
        private const string pre= "danmu/sse";

        public async Task InvokeAsync(HttpContext context)
        {
            Console.WriteLine("弹幕中间件");
       
            if(context.Request.Path.ToString().EndsWith(pre))
            {
                Console.WriteLine(context.Request.Path);
            }
            // Call the next delegate/middleware in the pipeline.
            await next(context);
        }
    }
}
